package verifica.plsdatabase;

public class UserTsCoord implements Comparable<UserTsCoord>{

	String username;
	long timestamp; 
	double lat;
	double lon; 
	long pls ;
	public UserTsCoord(String u, double la, double lo, long ts, long p){
		this.username = u;
		this.timestamp = ts;
		this.lat = la;
		this.lon = lo;
		this.pls = p;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public long getTimestamp() {
		return timestamp;
	}

	public void setTimestamp(long timestamp) {
		this.timestamp = timestamp;
	}

	public double getLat() {
		return lat;
	}

	public void setLat(double lat) {
		this.lat = lat;
	}

	public double getLon() {
		return lon;
	}

	public void setLon(double lon) {
		this.lon = lon;
	}
	
	public String toString(){
		return username+", "+lat+", "+lon+", "+timestamp+", "+pls;
	}
	
	public int compareTo(UserTsCoord u){
		
		if (pls < u.pls)
			return 1; 
	    if (pls > u.pls) 
	    	return -1;
	    return 0;
		
	}
}
